-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Machine learning segmentation #62
base: v0.1.7
Are you sure you want to change the base?
Conversation
Hello @leonardosepulveda! Thanks for updating this PR.
Comment last updated at 2021-01-08 21:09:37 UTC |
Hello @leonardosepulveda! Thanks for updating this PR.
|
Codecov Report
@@ Coverage Diff @@
## v0.1.7 #62 +/- ##
==========================================
+ Coverage 87.33% 87.49% +0.16%
==========================================
Files 57 59 +2
Lines 5108 5343 +235
==========================================
+ Hits 4461 4675 +214
- Misses 647 668 +21
Continue to review full report at Codecov.
|
I would like to merge this branch to master. I did tests and the new machine learning segmentation using cellpose is working, as well as the watershed CV2 implementation.However, there are some incompatibilities with merlin/utils/dataportal.py. How should I solve that issue? |
What is the incompatible you're finding with dataportal.py? I prefer for all the raw data access to go through the dataportal so that it is easy to switch between AWS, GC, or local storage. |
I am trying to solve the issues that appear in workflow and ci. So far I understand the output from both so I can go back into the code and make modifications. However, now the build stops in the testing part, but it is unclear to me where the problem is:
Any insights on how to debug? other place where I should look? |
It looks like you are a few commits behind the master and are incorporating some of the changes independently. Can you rebase this branch onto the head of the master branch so we can get all the commits incorporated? (see https://medium.com/@gabriellamedas/git-rebase-and-git-rebase-onto-a6a3f83f9cce). Then we can see if this problem persists. |
Thanks for the tip on rebase. It seems that the things started to work well, but the problem comes again with the changes I added to dataportal.py to make it look like the updated branch. See below what I get:
I looked at the patch 0066 , this is what says:
Any idea on how to proceed? |
If you open |
I found the problem. It was in the test_merfish part. I added some tasks for the new segmentation, and the problem seems to come from there. I created independent tests for debugging. |
The build run to the end now but the new test files I created cannot be found, this is the complaints
the folder test_analysis_parameters do not exist in my current branch, is there some data reorganization that I am missing? |
While running the tests it creates this directory and copies the files from the test/auxiliary files directory. You may have to update the base_files function in test/conftest.py to copy your test_analysis_segmentation json configurations into this folder. |
Thanks. Now the tests launch, but they are crashing for a reason I do not understand. I created the new tests by copying and modifying test_merfish.py and test_analysis_parameters.json. The current error is
For what I understand that random number task is not called in the text_merfish code, so I do not know why it is complaining. I notice that the test that is run before the segmentation tests is test_plotting, which calls the randomNumber tasks. Any insights? |
I changed the name of the tests from test_segmentation... to test_merfish_segmentation... and the workflow works now. The only difference is that the tests run before test_plotting. Is this because the results of each analysis are in the same folder, and when trying the new analysis it reads previous analysis too? This seems to be a bug as I would not expect that the order of the execution should matter. Any ideas on how to solve it? maybe clean the folder after each test? Now the codecov patch is the only part that is not passing. Most of the code I wrote is in segmentation.py., and has a coverage of 78%. I would need to create a 3D segmentation test to increase the coverage. Could you merge this branch to the main now or you want me to create 3D tests? |
Good |
I changed the name of nuclei_segmentation_cv2 to "machine_learning_segmentation". I will keep the cv2 segmentation capability and add a new class to allow the implementation of machine learning approaches. I will implement ilastik, U-nets and cellpose to begin with. The user will need to provide a trained model that can be used to segment either nuclei or cells. I will add a test function to compare the results of all available methods in a few FOVs.